3.3 \(\int (d+e x)^2 (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=103 \[ \frac{(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 e}-\frac{b \left (3 c^2 d^2-e^2\right ) \log \left (c^2 x^2+1\right )}{6 c^3}-\frac{b d \left (d^2-\frac{3 e^2}{c^2}\right ) \tan ^{-1}(c x)}{3 e}-\frac{b d e x}{c}-\frac{b e^2 x^2}{6 c} \]

[Out]

-((b*d*e*x)/c) - (b*e^2*x^2)/(6*c) - (b*d*(d^2 - (3*e^2)/c^2)*ArcTan[c*x])/(3*e) + ((d + e*x)^3*(a + b*ArcTan[
c*x]))/(3*e) - (b*(3*c^2*d^2 - e^2)*Log[1 + c^2*x^2])/(6*c^3)

________________________________________________________________________________________

Rubi [A]  time = 0.0896576, antiderivative size = 103, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {4862, 702, 635, 203, 260} \[ \frac{(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 e}-\frac{b \left (3 c^2 d^2-e^2\right ) \log \left (c^2 x^2+1\right )}{6 c^3}-\frac{b d \left (d^2-\frac{3 e^2}{c^2}\right ) \tan ^{-1}(c x)}{3 e}-\frac{b d e x}{c}-\frac{b e^2 x^2}{6 c} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2*(a + b*ArcTan[c*x]),x]

[Out]

-((b*d*e*x)/c) - (b*e^2*x^2)/(6*c) - (b*d*(d^2 - (3*e^2)/c^2)*ArcTan[c*x])/(3*e) + ((d + e*x)^3*(a + b*ArcTan[
c*x]))/(3*e) - (b*(3*c^2*d^2 - e^2)*Log[1 + c^2*x^2])/(6*c^3)

Rule 4862

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(a + b*
ArcTan[c*x]))/(e*(q + 1)), x] - Dist[(b*c)/(e*(q + 1)), Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{
a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 702

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int (d+e x)^2 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac{(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 e}-\frac{(b c) \int \frac{(d+e x)^3}{1+c^2 x^2} \, dx}{3 e}\\ &=\frac{(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 e}-\frac{(b c) \int \left (\frac{3 d e^2}{c^2}+\frac{e^3 x}{c^2}+\frac{c^2 d^3-3 d e^2+e \left (3 c^2 d^2-e^2\right ) x}{c^2 \left (1+c^2 x^2\right )}\right ) \, dx}{3 e}\\ &=-\frac{b d e x}{c}-\frac{b e^2 x^2}{6 c}+\frac{(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 e}-\frac{b \int \frac{c^2 d^3-3 d e^2+e \left (3 c^2 d^2-e^2\right ) x}{1+c^2 x^2} \, dx}{3 c e}\\ &=-\frac{b d e x}{c}-\frac{b e^2 x^2}{6 c}+\frac{(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 e}-\frac{1}{3} \left (b d \left (\frac{c d^2}{e}-\frac{3 e}{c}\right )\right ) \int \frac{1}{1+c^2 x^2} \, dx-\frac{\left (b \left (3 c^2 d^2-e^2\right )\right ) \int \frac{x}{1+c^2 x^2} \, dx}{3 c}\\ &=-\frac{b d e x}{c}-\frac{b e^2 x^2}{6 c}-\frac{b d \left (d^2-\frac{3 e^2}{c^2}\right ) \tan ^{-1}(c x)}{3 e}+\frac{(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 e}-\frac{b \left (3 c^2 d^2-e^2\right ) \log \left (1+c^2 x^2\right )}{6 c^3}\\ \end{align*}

Mathematica [A]  time = 0.329405, size = 163, normalized size = 1.58 \[ \frac{(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )-\frac{b \left (\left (c^2 d^2 \left (\sqrt{-c^2} d+3 e\right )-e^2 \left (3 \sqrt{-c^2} d+e\right )\right ) \log \left (1-\sqrt{-c^2} x\right )-\left (c^2 d^2 \left (\sqrt{-c^2} d-3 e\right )+e^2 \left (e-3 \sqrt{-c^2} d\right )\right ) \log \left (\sqrt{-c^2} x+1\right )+c^2 e^2 x (6 d+e x)\right )}{2 c^3}}{3 e} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2*(a + b*ArcTan[c*x]),x]

[Out]

((d + e*x)^3*(a + b*ArcTan[c*x]) - (b*(c^2*e^2*x*(6*d + e*x) + (-(e^2*(3*Sqrt[-c^2]*d + e)) + c^2*d^2*(Sqrt[-c
^2]*d + 3*e))*Log[1 - Sqrt[-c^2]*x] - (c^2*d^2*(Sqrt[-c^2]*d - 3*e) + e^2*(-3*Sqrt[-c^2]*d + e))*Log[1 + Sqrt[
-c^2]*x]))/(2*c^3))/(3*e)

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 137, normalized size = 1.3 \begin{align*}{\frac{a{e}^{2}{x}^{3}}{3}}+ae{x}^{2}d+ax{d}^{2}+{\frac{a{d}^{3}}{3\,e}}+{\frac{b{e}^{2}\arctan \left ( cx \right ){x}^{3}}{3}}+be\arctan \left ( cx \right ){x}^{2}d+b\arctan \left ( cx \right ) x{d}^{2}-{\frac{b{e}^{2}{x}^{2}}{6\,c}}-{\frac{bedx}{c}}-{\frac{b\ln \left ({c}^{2}{x}^{2}+1 \right ){d}^{2}}{2\,c}}+{\frac{b{e}^{2}\ln \left ({c}^{2}{x}^{2}+1 \right ) }{6\,{c}^{3}}}+{\frac{\arctan \left ( cx \right ) bed}{{c}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*arctan(c*x)),x)

[Out]

1/3*a*e^2*x^3+a*e*x^2*d+a*x*d^2+1/3*a/e*d^3+1/3*b*e^2*arctan(c*x)*x^3+b*e*arctan(c*x)*x^2*d+b*arctan(c*x)*x*d^
2-1/6*b*e^2*x^2/c-b*d*e*x/c-1/2/c*b*ln(c^2*x^2+1)*d^2+1/6/c^3*b*e^2*ln(c^2*x^2+1)+1/c^2*b*e*arctan(c*x)*d

________________________________________________________________________________________

Maxima [A]  time = 1.46562, size = 170, normalized size = 1.65 \begin{align*} \frac{1}{3} \, a e^{2} x^{3} + a d e x^{2} +{\left (x^{2} \arctan \left (c x\right ) - c{\left (\frac{x}{c^{2}} - \frac{\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d e + \frac{1}{6} \,{\left (2 \, x^{3} \arctan \left (c x\right ) - c{\left (\frac{x^{2}}{c^{2}} - \frac{\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b e^{2} + a d^{2} x + \frac{{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d^{2}}{2 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/3*a*e^2*x^3 + a*d*e*x^2 + (x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*d*e + 1/6*(2*x^3*arctan(c*x) - c
*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*e^2 + a*d^2*x + 1/2*(2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*b*d^2/c

________________________________________________________________________________________

Fricas [A]  time = 2.30074, size = 281, normalized size = 2.73 \begin{align*} \frac{2 \, a c^{3} e^{2} x^{3} +{\left (6 \, a c^{3} d e - b c^{2} e^{2}\right )} x^{2} + 6 \,{\left (a c^{3} d^{2} - b c^{2} d e\right )} x + 2 \,{\left (b c^{3} e^{2} x^{3} + 3 \, b c^{3} d e x^{2} + 3 \, b c^{3} d^{2} x + 3 \, b c d e\right )} \arctan \left (c x\right ) -{\left (3 \, b c^{2} d^{2} - b e^{2}\right )} \log \left (c^{2} x^{2} + 1\right )}{6 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/6*(2*a*c^3*e^2*x^3 + (6*a*c^3*d*e - b*c^2*e^2)*x^2 + 6*(a*c^3*d^2 - b*c^2*d*e)*x + 2*(b*c^3*e^2*x^3 + 3*b*c^
3*d*e*x^2 + 3*b*c^3*d^2*x + 3*b*c*d*e)*arctan(c*x) - (3*b*c^2*d^2 - b*e^2)*log(c^2*x^2 + 1))/c^3

________________________________________________________________________________________

Sympy [A]  time = 1.31008, size = 160, normalized size = 1.55 \begin{align*} \begin{cases} a d^{2} x + a d e x^{2} + \frac{a e^{2} x^{3}}{3} + b d^{2} x \operatorname{atan}{\left (c x \right )} + b d e x^{2} \operatorname{atan}{\left (c x \right )} + \frac{b e^{2} x^{3} \operatorname{atan}{\left (c x \right )}}{3} - \frac{b d^{2} \log{\left (x^{2} + \frac{1}{c^{2}} \right )}}{2 c} - \frac{b d e x}{c} - \frac{b e^{2} x^{2}}{6 c} + \frac{b d e \operatorname{atan}{\left (c x \right )}}{c^{2}} + \frac{b e^{2} \log{\left (x^{2} + \frac{1}{c^{2}} \right )}}{6 c^{3}} & \text{for}\: c \neq 0 \\a \left (d^{2} x + d e x^{2} + \frac{e^{2} x^{3}}{3}\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d**2*x + a*d*e*x**2 + a*e**2*x**3/3 + b*d**2*x*atan(c*x) + b*d*e*x**2*atan(c*x) + b*e**2*x**3*ata
n(c*x)/3 - b*d**2*log(x**2 + c**(-2))/(2*c) - b*d*e*x/c - b*e**2*x**2/(6*c) + b*d*e*atan(c*x)/c**2 + b*e**2*lo
g(x**2 + c**(-2))/(6*c**3), Ne(c, 0)), (a*(d**2*x + d*e*x**2 + e**2*x**3/3), True))

________________________________________________________________________________________

Giac [A]  time = 1.13929, size = 217, normalized size = 2.11 \begin{align*} \frac{2 \, b c^{3} x^{3} \arctan \left (c x\right ) e^{2} + 6 \, b c^{3} d x^{2} \arctan \left (c x\right ) e + 6 \, b c^{3} d^{2} x \arctan \left (c x\right ) + 2 \, a c^{3} x^{3} e^{2} + 6 \, a c^{3} d x^{2} e + 6 \, a c^{3} d^{2} x - 6 \, \pi b c d e \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - b c^{2} x^{2} e^{2} - 6 \, b c^{2} d x e - 3 \, b c^{2} d^{2} \log \left (c^{2} x^{2} + 1\right ) + 6 \, b c d \arctan \left (c x\right ) e + b e^{2} \log \left (c^{2} x^{2} + 1\right )}{6 \, c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

1/6*(2*b*c^3*x^3*arctan(c*x)*e^2 + 6*b*c^3*d*x^2*arctan(c*x)*e + 6*b*c^3*d^2*x*arctan(c*x) + 2*a*c^3*x^3*e^2 +
 6*a*c^3*d*x^2*e + 6*a*c^3*d^2*x - 6*pi*b*c*d*e*sgn(c)*sgn(x) - b*c^2*x^2*e^2 - 6*b*c^2*d*x*e - 3*b*c^2*d^2*lo
g(c^2*x^2 + 1) + 6*b*c*d*arctan(c*x)*e + b*e^2*log(c^2*x^2 + 1))/c^3